package com.linkdood.app.dto;

import com.linkdood.app.domain.Organization;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * organization dto
 * @author YunJ
 */
@Data
@NoArgsConstructor
public class OrganizationDTO {

    private String id;

    private String orgName;

    private String parentOrgId;

    private String orgCode;

    private String remark;

    private Long orgId;

    private LocalDateTime updateTime;

    private LocalDateTime createTime;

    private List<OrganizationDTO> children;

    public OrganizationDTO(Organization organization) {
        this.id = organization.getId();
        this.orgName = organization.getOrgName();
        this.parentOrgId = organization.getParentOrgId();
        this.orgCode = organization.getOrgCode();
        this.remark = organization.getRemark();
        this.orgId = organization.getOrgId();
        this.updateTime = organization.getUpdateTime();
        this.createTime = organization.getCreateTime();
    }
}
